<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<!--普通用户公共后台的头部栏-->
<nav class="navbar navbar-default navbar-fixed-top" role="navigation" th:fragment="topbar">
    <div class="container-fluid">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" th:href="@{/}">Hello World</a>
        </div>

        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav" id="daohangcaidan">
                <li><a th:href="@{/}" target="_self">首页</a></li>
            </ul>
            <img id="userIcon" style="width: 35px;height: 35px;margin-top: 8px;">
            <ul class="nav navbar-nav navbar-right">
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown"><span th:text="${session.username}"></span> <span class="caret"></span></a>
                    <ul class="dropdown-menu" role="menu">
                        <li><a th:href="@{/admin}"><span class="glyphicon glyphicon-user"></span>&nbsp;&nbsp;用户中心</a></li>
                        <li><a th:href="@{/lgout}"><span class="glyphicon glyphicon-log-out"></span>&nbsp;&nbsp;退出</a></li>
                    </ul>
                </li>
            </ul>
        </div>
    </div>
</nav>

</html>